/************************************************************************
 *
 * float.h
 *
 * (c) Copyright 1996-2004 Analog Devices, Inc.  All rights reserved.
 * $Revision: 1.1 $
 ************************************************************************/

/* Characteristics of floating point types */

#pragma once
#ifndef __NO_BUILTIN
#pragma system_header /* float.h */
#endif

#ifndef __FLOAT_DEFINED
#define __FLOAT_DEFINED

/* single precision floating point numbers are rounded to nearest	*/
/* double precision floating point numbers are truncated		*/
#define FLT_ROUNDS 4

#define	FLT_RADIX	2

#define	FLT_MANT_DIG	24
#define	FLT_DIG		6
#define	FLT_MIN_EXP	(-125)
#define	FLT_MIN_10_EXP	(-37)
#define	FLT_MAX_EXP	128
#define	FLT_MAX_10_EXP	38
#define FLT_MAX         3.4028234663852886E+38F
#define	FLT_EPSILON	1.1920928955078125E-07F
#define	FLT_MIN		1.1754943508222875E-38F

#define	LDBL_MANT_DIG	53
#define	LDBL_DIG	15
#define	LDBL_MIN_EXP	(-1021)
#define	LDBL_MIN_10_EXP	(-307)
#define	LDBL_MAX_EXP	1024
#define	LDBL_MAX_10_EXP	308
#define LDBL_MAX 	1.797693134862315708e+308L
#define	LDBL_EPSILON	2.2204460492503131e-16L
#define	LDBL_MIN	2.2250738585072014E-308L


#ifdef __DOUBLES_ARE_FLOATS__
#define	DBL_MANT_DIG	FLT_MANT_DIG
#define	DBL_DIG		FLT_DIG
#define	DBL_MIN_EXP	FLT_MIN_EXP
#define	DBL_MIN_10_EXP	FLT_MIN_10_EXP
#define	DBL_MAX_EXP	FLT_MAX_EXP
#define	DBL_MAX_10_EXP	FLT_MAX_10_EXP
#define DBL_MAX 	FLT_MAX
#define	DBL_EPSILON	FLT_EPSILON
#define	DBL_MIN		FLT_MIN
#else
#define	DBL_MANT_DIG	LDBL_MANT_DIG
#define	DBL_DIG		LDBL_DIG
#define	DBL_MIN_EXP	LDBL_MIN_EXP
#define	DBL_MIN_10_EXP	LDBL_MIN_10_EXP
#define	DBL_MAX_EXP	LDBL_MAX_EXP
#define	DBL_MAX_10_EXP	LDBL_MAX_10_EXP
#define	DBL_MAX		LDBL_MAX
#define	DBL_EPSILON	LDBL_EPSILON
#define	DBL_MIN		LDBL_MIN
#endif

#endif
